//
//  CertTLV.h
//  TestProject
//
//  Created by 武侠 on 2022/2/17.
//  Copyright © 2022 zhulong. All rights reserved.
//

#import "CertItemLength.h"

NS_ASSUME_NONNULL_BEGIN

@interface CertTLV : NSObject

// 计算
+ (NSString *)value: (char *)data begin: (int)begin;

// 解析：Bool类型
+ (NSString *)boolFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：Int类型
+ (NSString *)intFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：Octet String 字节码串 类型
+ (NSString *)octetStringFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：UASCII字符串,IA5String类型
+ (NSString *)uasciiStringFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：oid 对象标识符
+ (NSString *)oidFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：UTF8 String类型
+ (NSString *)utf8StringFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：Unicode String类型
+ (NSString *)unicodeStringFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

// 解析：Unicode String类型
+ (NSString *)utimeStringFromValue:(char *)data begin:(int)begin length:(CertItemLength *)length;

@end

NS_ASSUME_NONNULL_END
